home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
net
/
drexxmail.lha
/
sendmail.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1994-09-30
|
1KB
|
57 lines
/* sendmail.rexx ... script to fudge "sendmail" for DNET, */
/* Version 1.03, by Rick Taylor, 7-20-94 */
/* Version 3.00 - Just uses different names for */
/* GRn/AmigaElm/Send_Mail */
/* Thanks to Joe Rumsey for suggesting using 'putfiles' */
MailFile = ARG(1)
options results
lf = '0a'x
cr = '0d'x
address command
/* If the proper dshrexx isn't running, start it. Else go on */
/* We want to make sure there's some way to get commands to */
/* the UNIX side */
portok = show('p','DNETMAIL.01')
if portok = 0 then 'run <nil: >nil: dnet:dshrexx 8195 0 DNETMAIL'
waitforport DNETMAIL.01
waitforport DNETMAIL.01
/* Copy the mail file */
'copy' Mailfile "t:rsm.mail QUIET"
/* Put the file in your unix directory */
'dnet:putfiles <NIL: >NIL: t:rsm.mail'
/* Tell UNIX to send it now ... then delete the temp file on UNIX */
address 'DNETMAIL.01'
rxinit
"raw"
"send stty -echo" lf
getln
/* NOTE: Check this path to see if it's correct for your UNIX host */
"send /usr/lib/sendmail -t < rsm.mail"lf
getln
"send rm rsm.mail"lf
getln
/* Log this dshrexx out - we don't need it hanging around wasting space */
"send logout"lf
/* Good night, Gracie */
address command
'delete t:rsm.mail QUIET'
exit